//
//  ESTAcitvityDetailViewCell1.m
//  ESTSCRMAPP
//
//  Created by 李贤立 on 2018/10/17.
//  Copyright © 2018年 Capfer. All rights reserved.
//

#import "ESTAcitvityDetailViewCell1.h"
#import "ESTActivityModel.h"
@interface ESTAcitvityDetailViewCell1 ()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
@property (weak, nonatomic) IBOutlet UILabel *addressText;
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
@property (weak, nonatomic) IBOutlet UILabel *targetText;
@property (weak, nonatomic) IBOutlet UILabel *targetLabel;
@property (weak, nonatomic) IBOutlet UILabel *speakText;
@property (weak, nonatomic) IBOutlet UIButton *speakButton;
@end

@implementation ESTAcitvityDetailViewCell1

+ (instancetype)creatAcitvityDetailViewCell1:(UITableView *)tableView {
    ESTAcitvityDetailViewCell1 *cell = [tableView dequeueReusableCellWithIdentifier:@"ESTAcitvityDetailViewCell1"];
    if (cell == nil) {
        cell = [[NSBundle mainBundle] loadNibNamed:@"ESTAcitvityDetailViewCell1" owner:nil options:nil].lastObject;
    }
    return cell;
}
- (void)setModel:(ESTActivityModel *)model {
    _model = model;
    self.nameLabel.text= model.ACTIVITY_NAME;
    self.dateLabel.text = [NSString stringWithFormat:@"%@ - %@", model.ACTIVITY_STARTDATE, model.ACTIVITY_ENDDATE];
    self.addressLabel.text = model.ACTIVITY_PLACE;
    self.targetLabel.text = model.ACTIVITY_TARGET;
}
- (IBAction)didClickSpeakButton:(UIButton *)sender {
    if (self.didClickSpeakBlock) {
        self.didClickSpeakBlock();
    }
}

@end
